package lj.netty;

import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import lj.netty.bean.LJNettyInitContext;
import lj.netty.channel.ChannelHandlerCommon;

public abstract class ComAbsNettyTcp implements ComNetty {

    public String host;
    public int port;
    public final NioEventLoopGroup workerGroup = new NioEventLoopGroup();
    public final EventLoopGroup bossGroup = new NioEventLoopGroup();

    /** 上下文对象 */
    public LJNettyInitContext ljNettyInitContext;

    public void close() {
        bossGroup.shutdownGracefully();
        workerGroup.shutdownGracefully();
    }
}
